/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.tor.tribes.types;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 *
 * @author Torridity
 */
@Entity
@Table(name = "ParserPatternRelations")
public class ParserPatternRelation implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    @OneToOne(cascade = CascadeType.ALL)
    private ParserConfiguration config;
    @OneToOne
    private ParserPattern pattern;
    private String patternValue;

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the config
     */
    public ParserConfiguration getConfig() {
        return config;
    }

    /**
     * @param config the config to set
     */
    public void setConfig(ParserConfiguration config) {
        this.config = config;
    }

    /**
     * @return the pattern
     */
    public ParserPattern getPattern() {
        return pattern;
    }

    /**
     * @param pattern the pattern to set
     */
    public void setPattern(ParserPattern pattern) {
        this.pattern = pattern;
    }

    /**
     * @return the patternValue
     */
    public String getPatternValue() {
        return patternValue;
    }

    /**
     * @param patternValue the patternValue to set
     */
    public void setPatternValue(String patternValue) {
        this.patternValue = patternValue;
    }
}
